Function Reference

_DateToDayValue

Returns the daynumber since since noon 4713 BC January 1 for a given Gregorian date.

#include <date.au3>
_DateToDayValue ( $iYear, $iMonth, $iDay )

 

Parameters

$iYear A valid year in format YYYY
$iMonth A valid month in format MM
$iDay A valid day in format DD

 

Return Value

Success: Returns the Juliandate (days since noon 4713 BC January 1)
Failure: 0
@Error: 0 = No error.
1 = Invalid Input Date

 

Remarks

None.

 

Related

_DayValueToDate, _DateAdd, _DateDiff

 

Example


#include <Date.au3>

; Julian date of today.
$sJulDate = _DateToDayValue (@YEAR, @MON, @MDAY)
MsgBox(4096, "", "Todays Julian date is: " & $sJulDate)

; 14 days ago calculation.
Dim $Y, $M, $D
$sJulDate = _DayValueToDate ($sJulDate-14, $Y, $M, $D)
MsgBox(4096, "", "14 days ago:" & $M & "/" & $D & "/" & $Y)